package com.ysq.www.api.user.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ysq.www.api.user.entity.Job;
import com.ysq.www.api.user.service.IJobService;
import com.ysq.www.common.annotation.AuthToken;
import com.ysq.www.common.result.ResultMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 职位表 前端控制器
 * </p>
 *
 * @author dql
 * @since 2020-08-18
 */
@RestController
@RequestMapping("/user/job")
public class JobController {

    @Autowired
    private IJobService jobService;

    @GetMapping("/selectJob")
    @AuthToken
    public ResultMsg selectJob(){
        QueryWrapper<Job> wrapper = new QueryWrapper<>();
        wrapper.eq("status",0);
        List<Job> list = jobService.list(wrapper);
        return ResultMsg.SUCCESS.setNewData(list);
    }

}
